﻿@model IPagedList<JRFinances.ViewModels.Reviews.IndexReviewViewModel>
<link href="/Content/PagedList.css" rel="stylesheet" type="text/css" />

@{ Html.RenderPartial("_ReviewSearch");}

<p>
    @Html.ActionLink("Dodaj nowy artykul", "Create") | @Html.ActionLink("Zarzadzaj artykulami", "ManageOwned")
</p>
<div class="review_list">
    <table>
        <tr>
            <th>
                Tytul
            </th>
            <th>
                Autor
            </th>
            <th>
                Data
            </th>
        </tr>
        @foreach (var review in Model)
        {
            <tr>
                <td>
                    @Html.ActionLink(review.Title, "Details", new { id = review.ReviewId })
                </td>
                <td>
                    @Html.DisplayFor(modelItem => review.User)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => review.Date)
                </td>
            </tr>
        }
    </table>
</div>
<p>
    @Html.PagedListPager(Model, page => Url.Action("Index", new { page = page }), new PagedListRenderOptions { LinkToFirstPageFormat = "<< Pierwszy", LinkToPreviousPageFormat = "< Poprzedni", LinkToNextPageFormat = "Nastepny >", LinkToLastPageFormat = "Ostatni >>" })
</p>
